Optimal. Leaf size=26 \[ -\frac {\text {ArcTan}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3269, 211}
\begin {gather*} -\frac {\text {ArcTan}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 3269
Rubi steps
\begin {align*} \int \frac {\sin (x)}{a+b \cos ^2(x)} \, dx &=-\text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\cos (x)\right )\\ &=-\frac {\tan ^{-1}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 26, normalized size = 1.00 \begin {gather*} -\frac {\text {ArcTan}\left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {b}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 18, normalized size = 0.69
method | result | size |
derivativedivides | \(-\frac {\arctan \left (\frac {b \cos \left (x \right )}{\sqrt {a b}}\right )}{\sqrt {a b}}\) | \(18\) |
default | \(-\frac {\arctan \left (\frac {b \cos \left (x \right )}{\sqrt {a b}}\right )}{\sqrt {a b}}\) | \(18\) |
risch | \(-\frac {i \ln \left ({\mathrm e}^{2 i x}+\frac {2 i a \,{\mathrm e}^{i x}}{\sqrt {a b}}+1\right )}{2 \sqrt {a b}}+\frac {i \ln \left ({\mathrm e}^{2 i x}-\frac {2 i a \,{\mathrm e}^{i x}}{\sqrt {a b}}+1\right )}{2 \sqrt {a b}}\) | \(62\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 17, normalized size = 0.65 \begin {gather*} -\frac {\arctan \left (\frac {b \cos \left (x\right )}{\sqrt {a b}}\right )}{\sqrt {a b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 73, normalized size = 2.81 \begin {gather*} \left [-\frac {\sqrt {-a b} \log \left (-\frac {b \cos \left (x\right )^{2} + 2 \, \sqrt {-a b} \cos \left (x\right ) - a}{b \cos \left (x\right )^{2} + a}\right )}{2 \, a b}, -\frac {\sqrt {a b} \arctan \left (\frac {\sqrt {a b} \cos \left (x\right )}{a}\right )}{a b}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 66 vs.
\(2 (26) = 52\).
time = 0.41, size = 66, normalized size = 2.54 \begin {gather*} \begin {cases} \frac {\tilde {\infty }}{\cos {\left (x \right )}} & \text {for}\: a = 0 \wedge b = 0 \\\frac {1}{b \cos {\left (x \right )}} & \text {for}\: a = 0 \\- \frac {\cos {\left (x \right )}}{a} & \text {for}\: b = 0 \\- \frac {\log {\left (- \sqrt {- \frac {a}{b}} + \cos {\left (x \right )} \right )}}{2 b \sqrt {- \frac {a}{b}}} + \frac {\log {\left (\sqrt {- \frac {a}{b}} + \cos {\left (x \right )} \right )}}{2 b \sqrt {- \frac {a}{b}}} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 17, normalized size = 0.65 \begin {gather*} -\frac {\arctan \left (\frac {b \cos \left (x\right )}{\sqrt {a b}}\right )}{\sqrt {a b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.23, size = 18, normalized size = 0.69 \begin {gather*} -\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,\cos \left (x\right )}{\sqrt {a}}\right )}{\sqrt {a}\,\sqrt {b}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________